﻿using Shop.Core.Share;
using Shop.Model.Dto.Admin.JurUserRole;
using Shop.Model.View.Admin.JurUserRole;

namespace Shop.IServices.Admin;

public interface IJurRoleService: IAppService
{
    /// <summary>
    /// 添加角色
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<AppResult> Add(UserRoleAddDto dto);

    /// <summary>
    /// 修改角色
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<AppResult> Modify(UserRoleModifyDto dto);

    /// <summary>
    /// 删除角色
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<AppResult> Delete(DeleteDto dto);

    /// <summary>
    /// 获取角色列表
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    AppResult<PageModel<SystemUserRoleVo>> PageSearchRole(SysRolePageSearchDto dto);

    /// <summary>
    /// 获取所有对象
    /// </summary>
    /// <returns></returns>
    Task<AppResult<List<SystemUserRoleVo>>> GetAllRoleList();

    /// <summary>
    /// 添加权限
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<AppResult> AddAccess(UserRoleAddMenuDto dto);

    /// <summary>
    /// 角色权限树
    /// </summary>
    /// <param name="roleId"></param>
    /// <returns></returns>
    Task<AppResult<SysMenuTreeVo[]>> GetRoleMenuTree(long roleId);
}